package com.to8to.thrift.esb.async.example.server;

import com.to8to.kitt.esb.DefaultServerDeamon;
import com.to8to.thrift.esb.async.example.ServiceA;


public class ServerA_sync extends DefaultServerDeamon {

	public static void main(String[] args) {
		
//		ServiceAIface iface = new ServiceAIface();
//		
//		ServiceA.Processor<ServiceAIface> processor = new ServiceA.Processor<ServiceAIface>(iface);
//		
//		TProtocolFactory protocalFactory = new TBinaryProtocol.Factory();
//		
//		SyncBizChannelHandler bizhandler = new SyncBizChannelHandler(processor);
//		
//		ThriftBizServerChannelInitializer channelInitilizer = new ThriftBizServerChannelInitializer(protocalFactory, bizhandler, ServiceA.class);
//		
//		ServerA_sync server = new ServerA_sync(channelInitilizer);
//		
//		ZkConfig zkconfig = new ZkConfig("zk.properties");
//		
//		server.setSyncConfigFromZK(true);
//		
//		server.setReportAddressToZK(true);
//		
//		server.setZkConfig(zkconfig);
//		
//		server.setServiceInstance(ServiceA.class.getName(), "1");
//	
//		server.start();
		
		ServiceAIface iface = new ServiceAIface();
		
		new ServerA_sync().start(iface, ServiceA.class, args.length > 0 ? args[0] : "1");
	}

}
